package org.henau.EmergencyHandlerChain;
// 4. 具体处理器 - 障碍物处理 (ObstacleHandler.java)
public class ObstacleHandler extends EmergencyHandler {
    @Override
    protected boolean canHandle(EmergencyEvent event) {
        return event.getType() == EmergencyType.OBSTACLE;
    }

    @Override
    protected void processEvent(EmergencyEvent event) {
        System.out.println("[障碍处理] 处理事件: " + event.getCode());
        System.out.println("   → 启动激光雷达扫描");
        System.out.println("   → 生成避障路径");
        event.setResolved(true);
    }
}